from django.conf.urls.defaults import patterns, include, url

#import view

from nekonekotrace.views.getViews import *
from nekonekotrace.views.postViews import *
from nekonekotrace.views.frontViews import *
from nekonekotrace.views.uploadViews import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'nekoTrace.views.home', name='home'),
    # url(r'^nekoTrace/', include('nekoTrace.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    (r'^hello/$', hello),
    (r'^catinfo/(\d+)/$', catInfoView),
    (r'^catinfo/all/$', catInfoAllView),
    (r'^location/list/$', locationListView),
    (r'^locationinfo/(\d+)/$', locationInfoView),
    (r'^locationinfo/bycat/(\d+)/$', locationInfoByCatView),
    (r'^locationinfo/all/$', locationInfoAllView),
    (r'^catimpression/bycat/(\d+)/$', catImpressionByCatView),
    (r'^catimpression/byuser/(\d+)/$', catImpressionByUserView),
    (r'^catimpression/all/$', catImpressionAllView),
    (r'^catalbum/byuser/(\d+)/$', catAlbumByUserView),
    (r'^catalbum/bycat/(\d+)/$', catAlbumByCatView),
    (r'^catalbum/all/$', catAlbumListView),
    (r'^cattreat/bycat/(\d+)/$', catTreatByCatView),
    (r'^cattreat/byuser/(\d+)/$', catTreatByUserView),
    (r'^cattreat/all/$', catTreatAllView),
    (r'^saying/bycat/(\d+)/$', sayingByCatView),
    (r'^saying/byid/(\d+)/$', sayingByIDView),
    (r'^news/byid/(\d+)/$', newsByIDView),
    (r'^newslist/bycat/(\d+)/$', newslistByCatView),
    (r'^newslist/since/([^/]+)/bycat/(\d+)/$', newslistSinceByCatView),
    (r'^newslist/since/([^/]+)/all/$', newslistSinceAllView),
    (r'^newslist/all/$', newslistAllView),
    #for httpPost
    (r'^post/news/$', hello),
    (r'^post/catimpression/$', postCatImpressionView),
    (r'^post/locationinfo/$', postLocationInfoView),
    (r'^post/treat/$', postTreatView),
    (r'^post/catpic/$', postCatPicView),
    (r'^post/test/$', postTestView),
    #for web pages
    (r'^main/$', mainpageView),
    (r'^main/test/$', testpageView),
    (r'^upload/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT }),
    
    #test for RenRen App
    (r'^welcome/$', welcomeView),
    (r'^home/$', homeView),
)
